<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use DB;

class Areapoint extends Model
{
    //
    protected $table = 'area_point';
    public $timestamps = false;
    protected $casts = [
        'id' => 'string'
	];

	public function getAll() {
		$sql = "select area_point.id,area_point.area_id,area_point.lng_lat,area_point.color,area.name from area_point left join area on area_point.area_id=area.id";
		$area_points = DB::select($sql);
		return $area_points;
	}
}
